package com.becca.cake.dao.system;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.becca.cake.model.statistics.FusionChartsModel;
import com.becca.cake.model.system.DataDictionaryDO;
import com.becca.cake.model.system.Node;

/**
 * 数据字典dao层接口
 * @author hejinguo
 * @version $Id: DataDictionaryDAO.java, v 0.1 2013-12-20 上午01:25:18
 */
@Repository
public interface DataDictionaryDAO {
    /**
     * 查询数据字典菜单树
     * @author hejinguo
     * @param adminId
     * @return
     * @throws DataAccessException
     */
    List<Node> selectDictionaryTreeByAdminId(Long parentId) throws DataAccessException;

    /**
     * 根据ID查询数据字典信息
     * @author hejinguo
     * @param id
     * @return
     */
    Node selectDataDictionaryById(Long id) throws DataAccessException;

    /**
     * 根据ID查询数据字典信息
     * @author hejinguo
     * @param id
     * @return
     * @throws Exception
     */
    DataDictionaryDO selectDataDictionaryMsgById(String id) throws DataAccessException;

    /**
     * 添加数据字典信息
     * @author hejinguo
     * @param dataDictionaryDO
     * @throws Exception
     */
    void insetDataDictionary(DataDictionaryDO dataDictionaryDO) throws DataAccessException;

    /**
     * 修改数据字典信息
     * @author hejinguo
     * @param dataDictionaryDO
     * @throws Exception
     */
    void updateDataDictionaryById(DataDictionaryDO dataDictionaryDO) throws DataAccessException;

    /**
     * 数据字典中根据类型显示该类型下的全部数据
     * @author hejinguo
     * @param map
     * @return
     * @throws Exception
     */
    List<DataDictionaryDO> selectDataDictionary(Map<String, Object> paramMap)
                                                                             throws DataAccessException;

    /**
     * 根据value查询数据字典
     * @param paramerMap
     * @return
     */
    DataDictionaryDO selectDataDictionaryByValue(Map<String, Object> paramerMap);

    /**
     * 查询订单类型数据
     * @param paramerMap
     * @return
     */
    List<FusionChartsModel> selectDataDictionaryOrderType(Map<String, Object> paramerMap);

}
